<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();
$request_id=$_GET["rid"];
$mode=$_GET["mode"]; 

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$arr_data["rec_status"]=1;


if($request_id>0){

update_qry("bkitc_voip",$arr_data,"req_id=".$request_id);
qry_data("update bkitc_voip set last_updated='".$curTime."' where req_id=".$request_id);

}
else{

	$request_id=insert_qry("bkitc_voip",$arr_data);
	//$toEmailId=$arr_data["email_id"];
	//if($toEmailId!="") send_member_email($toEmailId,$memberId);

	qry_data("update bkitc_voip set req_submitted_date='".$curTime."' where req_id=".$request_id);

}



header("location:edit_voip.php?mode=edit&rid=".$request_id);
?>



